Web page and web application developers use scripting languages, such as JavaScript™, to provide dynamic behavior in a web page. For example, in response to a user input a script embedded and/or referenced in a page may be run and the result used to modify the display, e.g., to display output data, or to provide other dynamic behavior. Scripts not embedded statically in a page typically are loaded as source files (e.g., a .js file in the case of JavaScript).
A JavaScript or other source file may define a function, such as a first-class function, that behaves or can be made to behave similarly to a software object written using a true object-oriented programming language (OOPL or OOL). Such an “object” referenced in a page may have one or more “dependencies”; i.e., to execute properly one or more other objects (source files) must be present and initialized. Using typical prior art approaches—for example, Dojo and other techniques that employ XMLHttpRequest or similar objects, commands, and/or interfaces—such source dependencies are loaded synchronously, leading to a serialization of loads which may result in a significantly slower user experience. For example, a page may wait to load and/or client side application or other code may wait to execute or continue executing until a required object and all its dependencies have been loaded.